package com.lesson14.observe;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/9/17 20:43
 */
public class Client
{
    public static void main(String[] args)
    {
        WeatherData weatherData = new WeatherData();
        CurrentConditions currentConditions = new CurrentConditions();
        BaiduSite baiduSite = new BaiduSite();
        weatherData.registerObserver(currentConditions);
        weatherData.registerObserver(baiduSite);
        weatherData.remove(currentConditions);
        System.out.println("通知观察者，查看信息");
        weatherData.setData(10,100,30.3f);
    }
}
